1. Field of the Invention
This invention relates to data processing systems employing virtual memory partitioned into pages, and more specifically, to a means for permitting input/output (I/O) device adapters to allocate or resolve virtual pages into main storage pages as required for I/O data transfers.
2. Description of the Prior Art
Virtual addressing, the ability to address a large virtual space of data with an address as if the data were all contained in main storage, when the data may actually reside on a secondary storage device, rather than in main storage, has been used in central processing units (CPU's) for some time. However, I/O device adapters have not used virtual addresses until recently. When an I/O adapter references a location as a part of a data transfer, the I/O adapter may use an address for the location which could be virtual or real. As long as the data referenced by the address is actually present in main storage, there would be no difference in operation by the I/O adapter between a virtual and a real address (other than the need to convert the virtual address into a main storage address), because the data referenced is available for immediate access. When the data referenced by a virtual address is not in main storage, however, the I/O adapter must wait while the page containing the referenced virtual address is made available in main storage. The delay caused by waiting for the page to be resolved into a main storage address may cause the channel and/or the I/O adapter to be held in an unproductive state.
A particular problem which may arise when I/O adapters use virtual addressing concerns I/O buffers which, when referenced by virtual addresses, may need to be immediately available in main storage. For example, some I/O adapters, such as communication I/O adapters, can receive large amounts of data from other communication systems. In such situations, the CPU knows only the maximum amount of data that could possibly be sent; the actual amount of data to be sent is not known until the other communication system starts to transfer the data. Because an I/O adapter typically does not have sufficient buffering capacity of its own to buffer up large amounts of data from the sending communication system while the CPU is attempting to obtain from secondary storage the virtual memory pages associated with the data to be received, in the prior art the CPU was required to reserve in main storage a sufficient number of pages to provide for the maximum amount of data that the I/O adapter could possibly receive. By this means it could be assured that all pages required by the I/O adapter would be available in main storage in time to avoid overrunning the adapter or the need for buffering in the I/O adapter. The disadvantage of this arrangement is that typically far more main storage is reserved for use by the I/O adapter than the I/O adapter actually needs to perform the data transfer.
Accordingly, a basic problem with providing I/O adapters with virtual addressing capability concerns situations where page faults may occur, i.e., the adapter references a page not present in main storage. In some cases, such faults may be allowed to occur, but the channel, the I/O adapter and other resources should not be tied up needlessly while waiting for the address to be resolved. In other cases, such as data communications, such faults must be avoided or minimized.